package com.burpee.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.burpee.dao.ExerciseOrderDao;
import com.burpee.ui.ExerciseOrder;

@Service(value="exerciseorderService")
public class ExerciseOrderServiceImpl implements ExerciseOrderService {

	@Autowired
	ExerciseOrderDao exerciseOrderDao;
	public List<ExerciseOrder> list() {
		
		return exerciseOrderDao.list();
	}

	public ExerciseOrder view(ExerciseOrder exerciseOrder) {
		
		return exerciseOrderDao.view(exerciseOrder);
	}

	public boolean add(ExerciseOrder exerciseOrder) {
		if(exerciseOrderDao.add(exerciseOrder) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean modify(ExerciseOrder exerciseOrder) {
		if(exerciseOrderDao.modify(exerciseOrder) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean remove(ExerciseOrder exerciseOrder) {
		if(exerciseOrderDao.remove(exerciseOrder) > 0){
			return true;
		}
		else{

			return false;
		}
	}

}
